let obj = {
  attr1: Symbol(),
  attr2: Symbol(),
  attr3: Symbol(),
}
function myFun (param) {
  switch (param) {
    case obj.attr1:
      console.log(1);
      break;
    case obj.attr2:
      console.log(2);
      break;
    case obj.attr3:
      console.log(3);
      break;
    default:
      console.log(0);
      break;
  }
}

myFun(obj.attr1);